﻿<UserControl x:Class="LatestChatty.Controls.MyPostsListControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:chatty="clr-namespace:LatestChatty.Classes"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Grid.Row="1" Margin="0,0,0,0">
        <ListBox Margin="0,0,0,0" ItemsSource="{Binding SearchResults}" SelectionChanged="SelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="0,0,0,10" Width="400">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TextBlock Margin="0,0,5,0" HorizontalAlignment="Right" Text="{Binding dateText}" FontSize="20" Foreground="#ffba00"/>
                        <TextBlock Grid.Row="1" Text="{Binding body}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}" Foreground="#FFFFFF" MaxHeight="84"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
